import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;


public class Vector 
{
	
	BufferedReader keyboard=new BufferedReader(new InputStreamReader(System.in));
	List<Product> Vector=new ArrayList<Product>();
	public void addProducts() throws IOException
	{
		System.out.println("Name of product:");
		String name=keyboard.readLine();
		System.out.println("Code of product:");
		int code=Integer.parseInt(keyboard.readLine());
		System.out.println("Price of product:");
		int price=Integer.parseInt(keyboard.readLine());
		System.out.println("Amount:");
		int amount=Integer.parseInt(keyboard.readLine());
		Vector.add(new Product(name, code, price, amount));
	}
	public void eraseProduct() throws NumberFormatException, IOException
	{
		System.out.println("Type the code of the product you want to erase");
		int code_erase=Integer.parseInt(keyboard.readLine());
		ListIterator it=Vector.listIterator();
	}
	public void showProduct()
	{
		ListIterator it=Vector.listIterator();
		while(it.hasNext())
			System.out.println(it.next());
	}
}
